use std::sync::Arc;

use crate::Result;

pub struct Service {
    pub default: reqwest::Client,
    pub extern_media: reqwest::Client,
    pub well_known: reqwest::Client,
    pub federation: reqwest::Client,
    pub sender: reqwest::Client,
}

impl Service {
    pub fn build(args: &crate::server::Args) -> Result<Arc<Self>> {
        let default = reqwest::Client::new();
        let extern_media = reqwest::Client::new();
        let well_known = reqwest::Client::new();
        let federation = reqwest::Client::new();
        let sender = reqwest::Client::new();
        Ok(Arc::new(Self {
            default,
            extern_media,
            well_known,
            federation,
            sender,
        }))
    }
}
